 <%@ page language="java" contentType="text/html; charset=UTF-8" 
    pageEncoding="UTF-8"%> 
<%
  String xm = this.getServletContext().getInitParameter("path");
	String path1 = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+"/"+xm;
%>  
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
 <html xmlns="http://www.w3.org/1999/xhtml">
 <head> 
    <title> 
      
    </title> 
    <!-- 新 Bootstrap 核心 CSS 文件 -->
    <!-- 新 Bootstrap 核心 CSS 文件 -->
<link rel="stylesheet" href="<%=path1%>/qt/ycss/bootstrap.min.css">

<!-- 可选的Bootstrap主题文件（一般不用引入） -->
<link rel="stylesheet" href="<%=path1%>/qt/ycss/bootstrap-theme.min.css">

<!-- jQuery文件。务必在bootstrap.min.js 之前引入 -->
<script src="<%=path1%>/qt/yjs/jquery.min.js"></script>

<!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
<script src="<%=path1%>/qt/yjs/bootstrap.min.js"></script>
  
    
<script type="text/javascript" src="<%=path1%>/scripts/jquery-1.7.2.js"></script> 
<script type="text/javascript" src="<%=path1%>/scripts/pagekage/utils/widget/jqGrid/jquery.jqGrid.src.js"></script>
<script type="text/javascript" src="<%=path1%>/scripts/pagekage/utils/widget/jqGrid/i18n/grid.locale-cn.js"></script>
<script type="text/javascript" src="<%=path1%>/scripts/pagekage/utils/widget/jqGrid/jquery.jqGrid.min.js"></script>
 <script type="text/javascript">
//添加
    function ajaxPost(){
	var ccc=321;
      $.ajax({ 	
        data:{
        	role_id:$("#id123").val(),
        	role_name:$("#role_name").val(),
        	pid:$("#pid").val(),
        	menu_url:$("#menu_url").val(),
        	update_user:$("#update_user").val(),
        	update_time:$("#update_time").val(),
        	delete_user:$("#delete_user").val(),
        	delete_time:$("#delete_time").val(),
        	delete_state:$("#delete_state").val()
        	
        },
        	
        type:"Post",  
        dataType: 'json',  
        url:"../role/addRole.do", 
        error:function(data){ 
        //	alert(data);
             alert("出错了！！");  
        },  
        success:function(data){
        //	alert(data);
        	alert('角色添加成功！');
        	window.location.href = 'listrole.jsp'; 
         }  
         });  
     } 


</script>
</head>    
<body>  

  <div style="width: 600px; margin-left:auto; margin-right:auto;">

<div class="form-group has-success">
  <label class="control-label" for="inputSuccess1">角色名称</label>
  <input type="text" class="form-control" id="role_name">
</div>


      <input type="button" value="　提　交" onclick="ajaxPost()" class="btn btn-success"/>
    <input type="button" value="　取　消　"  class="btn btn-success"/>
　　　　　　　　
　　　　　　　　
</div>


</table>
   
</body>
</html>
    